package com.cheng.im.service.massage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.cheng.im.service.message.domain.ImMessageHistory;
import com.cheng.im.service.message.model.resp.LastMessageResp;
import com.cheng.im.service.message.model.resp.MessageListResp;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author Cheng
* @description 针对表【im_message_history】的数据库操作Mapper
* @createDate 2025-01-09 08:19:12
* @Entity generator.domain.ImMessageHistory
*/
public interface ImMessageHistoryMapper extends BaseMapper<ImMessageHistory> {

    LastMessageResp getUserLastMessage(@Param("fromId") String fromId, @Param("toId") String toId, @Param("appId") String appId);

    List<MessageListResp> getMsgListByUserId(@Param("ownerId") String ownerId, @Param("from") String from,
                                             @Param("to") String to, @Param("appId") String appId);
}




